home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 September / Chip_2002-09_cd1.bin / sharewar / slunec / app / httrack.exe / {app} / src_win / WinHTTrack / inprogress.cpp < prev    next >
C/C++ Source or Header  |  2002-05-01  |  30KB  |  1,070 lines

  1. // inprogress.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "Shell.h"
  6. #include "inprogress.h"
  7. #include "about.h"
  8. #include "iplog.h"
  9.  
  10. #include "NewProj.h"
  11. //#include "option.h"
  12.  
  13. /* Externe C */
  14. extern "C" {
  15.   #include "htscore.h"
  16. }
  17.  
  18. #include "Wid1.h"
  19. #include "EasyDropTarget.h"
  20.  
  21. #include "InfoUrl.h"
  22.  
  23. extern CNewProj* dialog0;
  24. extern CMainTab* maintab;
  25.  
  26. /*
  27. extern int INPROGRESS_LOCKED;
  28. */
  29. extern int termine_requested;
  30. extern int termine;
  31. extern int soft_term_requested;
  32. /*
  33. extern int INPROGRESS_LOCKED;
  34. extern int INREFRESH_LOCKED;
  35. */
  36. extern HICON httrack_icon;
  37. //extern int fexist(char*);
  38. //extern char* fconcat(char*,char*);
  39. extern char choixdeb[3];
  40. // PATCH-->
  41. extern int termine;
  42.  
  43. /* interrupted!! */
  44. extern "C" int exit_xh;
  45.  
  46. // Helper
  47. extern LaunchHelp* HtsHelper;
  48.  
  49. // InfoUrl
  50. extern CInfoUrl* _Cinprogress_inst;
  51.  
  52. #ifdef _DEBUG
  53. #define new DEBUG_NEW
  54. #undef THIS_FILE
  55. static char THIS_FILE[] = __FILE__;
  56. #endif
  57.  
  58. // Refresh
  59. //extern int INFILLMEM_LOCKED;     // refresh mΘmoire en cours
  60. extern InpInfo SInfo;
  61. int inprogress_refresh();
  62.  
  63. // this app
  64. #include "Winhttrack.h"
  65. extern CWinHTTrackApp* this_app;
  66.  
  67.  
  68. // objet
  69. extern Cinprogress* inprogress;
  70.  
  71.  
  72. /* pour la fin */
  73. #include "DialogContainer.h"
  74. #include "splitter.h"
  75. extern CSplitterFrame* this_CSplitterFrame;
  76. #include "infoend.h"
  77. extern Cinfoend* this_Cinfoend;
  78.  
  79. /* Main WizTab frame */
  80. #include "WizTab.h"
  81. extern CWizTab* this_CWizTab;
  82. extern CWizTab* this_intCWizTab;
  83.  
  84. // Pour la fin
  85. char end_mirror_msg[8192]="";
  86.  
  87. extern t_StatsBuffer StatsBuffer[NStatsBuffer];
  88.  
  89.  
  90. /////////////////////////////////////////////////////////////////////////////
  91. // Cinprogress dialog
  92. IMPLEMENT_DYNCREATE(Cinprogress, CPropertyPage)
  93.  
  94.  
  95. Cinprogress::Cinprogress()
  96.     : CPropertyPage(Cinprogress::IDD)
  97. {
  98.   timer=0;
  99.   //{{AFX_DATA_INIT(Cinprogress)
  100.     m_inphide = FALSE;
  101.     //}}AFX_DATA_INIT
  102. }
  103.  
  104. void Cinprogress::DoDataExchange(CDataExchange* pDX)
  105. {
  106.     CPropertyPage::DoDataExchange(pDX);
  107.     //{{AFX_DATA_MAP(Cinprogress)
  108.     DDX_Control(pDX, IDC_nn9, m_nn9);
  109.     DDX_Control(pDX, IDC_nn8, m_nn8);
  110.     DDX_Control(pDX, IDC_nn7, m_nn7);
  111.     DDX_Control(pDX, IDC_nn6, m_nn6);
  112.     DDX_Control(pDX, IDC_nn5, m_nn5);
  113.     DDX_Control(pDX, IDC_nn4, m_nn4);
  114.     DDX_Control(pDX, IDC_nn3, m_nn3);
  115.     DDX_Control(pDX, IDC_nn2, m_nn2);
  116.     DDX_Control(pDX, IDC_nn13, m_nn13);
  117.     DDX_Control(pDX, IDC_nn12, m_nn12);
  118.     DDX_Control(pDX, IDC_nn11, m_nn11);
  119.     DDX_Control(pDX, IDC_nn10, m_nn10);
  120.     DDX_Control(pDX, IDC_nn1, m_nn1);
  121.     DDX_Control(pDX, IDC_nn0, m_nn0);
  122.     DDX_Control(pDX, IDC_nm13, m_nm13);
  123.     DDX_Control(pDX, IDC_nm12, m_nm12);
  124.     DDX_Control(pDX, IDC_nm11, m_nm11);
  125.     DDX_Control(pDX, IDC_nm10, m_nm10);
  126.     DDX_Control(pDX, IDC_nm9, m_nm9);
  127.     DDX_Control(pDX, IDC_nm8, m_nm8);
  128.     DDX_Control(pDX, IDC_nm7, m_nm7);
  129.     DDX_Control(pDX, IDC_nm6, m_nm6);
  130.     DDX_Control(pDX, IDC_nm5, m_nm5);
  131.     DDX_Control(pDX, IDC_nm4, m_nm4);
  132.     DDX_Control(pDX, IDC_nm3, m_nm3);
  133.     DDX_Control(pDX, IDC_nm2, m_nm2);
  134.     DDX_Control(pDX, IDC_nm1, m_nm1);
  135.     DDX_Control(pDX, IDC_nm0, m_nm0);
  136.     DDX_Control(pDX, IDC_st13, m_st13);
  137.     DDX_Control(pDX, IDC_st12, m_st12);
  138.     DDX_Control(pDX, IDC_st11, m_st11);
  139.     DDX_Control(pDX, IDC_st10, m_st10);
  140.     DDX_Control(pDX, IDC_st9, m_st9);
  141.     DDX_Control(pDX, IDC_st8, m_st8);
  142.     DDX_Control(pDX, IDC_st7, m_st7);
  143.     DDX_Control(pDX, IDC_st6, m_st6);
  144.     DDX_Control(pDX, IDC_st5, m_st5);
  145.     DDX_Control(pDX, IDC_st4, m_st4);
  146.     DDX_Control(pDX, IDC_st3, m_st3);
  147.     DDX_Control(pDX, IDC_st2, m_st2);
  148.     DDX_Control(pDX, IDC_st1, m_st1);
  149.     DDX_Control(pDX, IDC_st0, m_st0);
  150.     DDX_Control(pDX, IDC_sk0, m_sk0);
  151.     DDX_Control(pDX, IDC_sk1, m_sk1);
  152.     DDX_Control(pDX, IDC_sk2, m_sk2);
  153.     DDX_Control(pDX, IDC_sk3, m_sk3);
  154.     DDX_Control(pDX, IDC_sk4, m_sk4);
  155.     DDX_Control(pDX, IDC_sk5, m_sk5);
  156.     DDX_Control(pDX, IDC_sk6, m_sk6);
  157.     DDX_Control(pDX, IDC_sk7, m_sk7);
  158.     DDX_Control(pDX, IDC_sk8, m_sk8);
  159.     DDX_Control(pDX, IDC_sk9, m_sk9);
  160.     DDX_Control(pDX, IDC_sk10, m_sk10);
  161.     DDX_Control(pDX, IDC_sk11, m_sk11);
  162.     DDX_Control(pDX, IDC_sk12, m_sk12);
  163.     DDX_Control(pDX, IDC_sk13, m_sk13);
  164.     DDX_Control(pDX, IDC_sl0, m_sl0);
  165.     DDX_Control(pDX, IDC_sl1, m_sl1);
  166.     DDX_Control(pDX, IDC_sl2, m_sl2);
  167.     DDX_Control(pDX, IDC_sl3, m_sl3);
  168.     DDX_Control(pDX, IDC_sl4, m_sl4);
  169.     DDX_Control(pDX, IDC_sl5, m_sl5);
  170.     DDX_Control(pDX, IDC_sl6, m_sl6);
  171.     DDX_Control(pDX, IDC_sl7, m_sl7);
  172.     DDX_Control(pDX, IDC_sl8, m_sl8);
  173.     DDX_Control(pDX, IDC_sl9, m_sl9);
  174.     DDX_Control(pDX, IDC_sl10, m_sl10);
  175.     DDX_Control(pDX, IDC_sl11, m_sl11);
  176.     DDX_Control(pDX, IDC_sl12, m_sl12);
  177.     DDX_Control(pDX, IDC_sl13, m_sl13);
  178.     DDX_Check(pDX, IDC_inphide, m_inphide);
  179.     //}}AFX_DATA_MAP
  180. }
  181.  
  182. //const UINT wm_IcnRest = RegisterWindowMessage( FINDMSGSTRING );
  183. #define wm_CEasyDropTargetCallback (WM_USER + 2)
  184. #define wm_Timer (WM_USER + 3)
  185. #define wm_MirrorFinished (WM_USER + 4)
  186. BEGIN_MESSAGE_MAP(Cinprogress, CPropertyPage)
  187.     //{{AFX_MSG_MAP(Cinprogress)
  188.     ON_WM_CLOSE()
  189.     ON_BN_CLICKED(IDC_sk0, Onsk0)
  190.     ON_BN_CLICKED(IDC_sk1, Onsk1)
  191.     ON_BN_CLICKED(IDC_sk2, Onsk2)
  192.     ON_BN_CLICKED(IDC_sk3, Onsk3)
  193.     ON_BN_CLICKED(IDC_sk4, Onsk4)
  194.     ON_BN_CLICKED(IDC_sk5, Onsk5)
  195.     ON_BN_CLICKED(IDC_sk6, Onsk6)
  196.     ON_BN_CLICKED(IDC_sk7, Onsk7)
  197.     ON_BN_CLICKED(IDC_sk8, Onsk8)
  198.     ON_BN_CLICKED(IDC_sk9, Onsk9)
  199.     ON_BN_CLICKED(IDCANCEL, OnEscape)
  200.     ON_BN_CLICKED(IDC_ipabout, Onipabout)
  201.     ON_WM_DESTROY()
  202.     ON_WM_HELPINFO()
  203.     ON_BN_CLICKED(IDC_sk10, Onsk10)
  204.     ON_BN_CLICKED(IDC_sk11, Onsk11)
  205.     ON_BN_CLICKED(IDC_sk12, Onsk12)
  206.     ON_BN_CLICKED(IDC_sk13, Onsk13)
  207.     ON_WM_CREATE()
  208.     ON_BN_CLICKED(IDC_nm0, Onnm0)
  209.     ON_BN_CLICKED(IDC_nm1, Onnm1)
  210.     ON_BN_CLICKED(IDC_nm2, Onnm2)
  211.     ON_BN_CLICKED(IDC_nm3, Onnm3)
  212.     ON_BN_CLICKED(IDC_nm4, Onnm4)
  213.     ON_BN_CLICKED(IDC_nm5, Onnm5)
  214.     ON_BN_CLICKED(IDC_nm6, Onnm6)
  215.     ON_BN_CLICKED(IDC_nm7, Onnm7)
  216.     ON_BN_CLICKED(IDC_nm8, Onnm8)
  217.     ON_BN_CLICKED(IDC_nm9, Onnm9)
  218.     ON_BN_CLICKED(IDC_nm10, Onnm10)
  219.     ON_BN_CLICKED(IDC_nm11, Onnm11)
  220.     ON_BN_CLICKED(IDC_nm12, Onnm12)
  221.     ON_BN_CLICKED(IDC_nm13, Onnm13)
  222.     ON_BN_CLICKED(IDC_nn0, Onnm0)
  223.     ON_BN_CLICKED(IDC_nn1, Onnm1)
  224.     ON_BN_CLICKED(IDC_nn2, Onnm2)
  225.     ON_BN_CLICKED(IDC_nn3, Onnm3)
  226.     ON_BN_CLICKED(IDC_nn4, Onnm4)
  227.     ON_BN_CLICKED(IDC_nn5, Onnm5)
  228.     ON_BN_CLICKED(IDC_nn6, Onnm6)
  229.     ON_BN_CLICKED(IDC_nn7, Onnm7)
  230.     ON_BN_CLICKED(IDC_nn8, Onnm8)
  231.     ON_BN_CLICKED(IDC_nn9, Onnm9)
  232.     ON_BN_CLICKED(IDC_nn10, Onnm10)
  233.     ON_BN_CLICKED(IDC_nn11, Onnm11)
  234.     ON_BN_CLICKED(IDC_nn12, Onnm12)
  235.     ON_BN_CLICKED(IDC_nn13, Onnm13)
  236.   ON_BN_CLICKED(IDC_st0, Onst0)
  237.     ON_BN_CLICKED(IDC_st1, Onst1)
  238.     ON_BN_CLICKED(IDC_st2, Onst2)
  239.     ON_BN_CLICKED(IDC_st3, Onst3)
  240.     ON_BN_CLICKED(IDC_st4, Onst4)
  241.     ON_BN_CLICKED(IDC_st5, Onst5)
  242.     ON_BN_CLICKED(IDC_st6, Onst6)
  243.     ON_BN_CLICKED(IDC_st7, Onst7)
  244.     ON_BN_CLICKED(IDC_st8, Onst8)
  245.     ON_BN_CLICKED(IDC_st9, Onst9)
  246.     ON_BN_CLICKED(IDC_st10, Onst10)
  247.     ON_BN_CLICKED(IDC_st11, Onst11)
  248.     ON_BN_CLICKED(IDC_st12, Onst12)
  249.     ON_BN_CLICKED(IDC_st13, Onst13)
  250.     ON_WM_TIMER()
  251.     ON_BN_CLICKED(IDC_inphide, Oninphide)
  252.     //}}AFX_MSG_MAP
  253.   ON_MESSAGE( wm_CEasyDropTargetCallback, DragDropText)
  254.   ON_NOTIFY_EX( TTN_NEEDTEXT, 0, OnToolTipNotify )
  255.   ON_BN_CLICKED(ID_ABOUT,Onipabout)
  256.   ON_BN_CLICKED(ID_FILE_EXIT,OnStopall)
  257.   ON_BN_CLICKED(ID_LOG_VIEWLOG,OniplogLog)
  258.   ON_BN_CLICKED(ID_LOG_VIEWERRORLOG,OniplogErr)
  259.   ON_BN_CLICKED(ID_LOG_VIEWTRANSFERS,OnViewTransfers)
  260.   ON_BN_CLICKED(ID_FILE_PAUSE,OnPause)
  261.   ON_BN_CLICKED(ID_OPTIONS_MODIFY,OnModifyOpt)
  262.   ON_COMMAND(ID_HELP_FINDER,OnHelpInfo2)
  263.   ON_COMMAND(ID_HELP,OnHelpInfo2)
  264.     ON_COMMAND(ID_DEFAULT_HELP,OnHelpInfo2)
  265.   // Fin du miroir
  266.   ON_MESSAGE( wm_MirrorFinished, OnEndMirror)
  267.   END_MESSAGE_MAP()
  268. //ON_REGISTERED_MESSAGE( wm_IcnRest, IconRestore )
  269. /////////////////////////////////////////////////////////////////////////////
  270. // Cinprogress message handlers
  271.  
  272. void Cinprogress::OnClose() 
  273. {
  274.   OnStopall();
  275. }
  276.  
  277. void Cinprogress::Onsk0()  {
  278.   if (hts_is_parsing(-1)) {  // parsing
  279.     if (hts_is_testing())
  280.       hts_cancel_test();     // cancel test
  281.     /*else*/
  282.     hts_cancel_parsing();  // cancel parsing
  283.   } else
  284.     StatsBuffer_cancel(0);
  285. }
  286. void Cinprogress::Onsk1()  {
  287.   StatsBuffer_cancel(1);
  288. }
  289. void Cinprogress::Onsk2()  {
  290.   StatsBuffer_cancel(2);
  291. }
  292. void Cinprogress::Onsk3()  {
  293.   StatsBuffer_cancel(3);
  294. }
  295. void Cinprogress::Onsk4()  {
  296.   StatsBuffer_cancel(4);
  297. }
  298. void Cinprogress::Onsk5()  {
  299.   StatsBuffer_cancel(5);
  300. }
  301. void Cinprogress::Onsk6()  {
  302.   StatsBuffer_cancel(6);
  303. }
  304. void Cinprogress::Onsk7()  {
  305.   StatsBuffer_cancel(7);
  306. }
  307. void Cinprogress::Onsk8()  {
  308.   StatsBuffer_cancel(8);
  309. }
  310. void Cinprogress::Onsk9()  {
  311.   StatsBuffer_cancel(9);
  312. }
  313. void Cinprogress::Onsk10()  {
  314.   StatsBuffer_cancel(10);
  315. }
  316. void Cinprogress::Onsk11()  {
  317.   StatsBuffer_cancel(11);
  318. }
  319. void Cinprogress::Onsk12()  {
  320.   StatsBuffer_cancel(12);
  321. }
  322. void Cinprogress::Onsk13()  {
  323.   StatsBuffer_cancel(13);
  324. }
  325.  
  326.  
  327. // Capture des static
  328. void Cinprogress::Onnm0()  { StatsBuffer_info(0); }
  329. void Cinprogress::Onnm1()  { StatsBuffer_info(1); }
  330. void Cinprogress::Onnm2()  { StatsBuffer_info(2); }
  331. void Cinprogress::Onnm3()  { StatsBuffer_info(3); }
  332. void Cinprogress::Onnm4()  { StatsBuffer_info(4); }
  333. void Cinprogress::Onnm5()  { StatsBuffer_info(5); }
  334. void Cinprogress::Onnm6()  { StatsBuffer_info(6); }
  335. void Cinprogress::Onnm7()  { StatsBuffer_info(7); }
  336. void Cinprogress::Onnm8()  { StatsBuffer_info(8); }
  337. void Cinprogress::Onnm9()  { StatsBuffer_info(9); }
  338. void Cinprogress::Onnm10() { StatsBuffer_info(10); }
  339. void Cinprogress::Onnm11() { StatsBuffer_info(11); }
  340. void Cinprogress::Onnm12() { StatsBuffer_info(12); }
  341. void Cinprogress::Onnm13() { StatsBuffer_info(13); }
  342.  
  343. void Cinprogress::Onst0()  { StatsBuffer_info(0); }
  344. void Cinprogress::Onst1()  { StatsBuffer_info(1); }
  345. void Cinprogress::Onst2()  { StatsBuffer_info(2); }
  346. void Cinprogress::Onst3()  { StatsBuffer_info(3); }
  347. void Cinprogress::Onst4()  { StatsBuffer_info(4); }
  348. void Cinprogress::Onst5()  { StatsBuffer_info(5); }
  349. void Cinprogress::Onst6()  { StatsBuffer_info(6); }
  350. void Cinprogress::Onst7()  { StatsBuffer_info(7); }
  351. void Cinprogress::Onst8()  { StatsBuffer_info(8); }
  352. void Cinprogress::Onst9()  { StatsBuffer_info(9); }
  353. void Cinprogress::Onst10() { StatsBuffer_info(10); }
  354. void Cinprogress::Onst11() { StatsBuffer_info(11); }
  355. void Cinprogress::Onst12() { StatsBuffer_info(12); }
  356. void Cinprogress::Onst13() { StatsBuffer_info(13); }
  357.  
  358. // touche escape
  359. void Cinprogress::OnEscape() { 
  360.   OnStopall();
  361. }
  362.  
  363. void Cinprogress::OnStopall() 
  364. {
  365.   this_CSplitterFrame->CheckRestore();
  366.   if (AfxMessageBox(
  367.     LANG(LANG_H1 /*"Stop WinHTTrack?",
  368.            "Stopper WinHTTrack?"*/)
  369.     ,MB_OKCANCEL+MB_ICONQUESTION)==IDOK) {
  370.     hts_setpause(0);
  371.     if (soft_term_requested)
  372.       termine_requested=1;
  373.     else {
  374.       soft_term_requested=1;
  375.       hts_request_stop(0);
  376.     }
  377.   }
  378. }
  379.  
  380. void Cinprogress::Onipabout() 
  381. {
  382.   Cabout about;
  383.   about.DoModal();
  384. }
  385.  
  386. void Cinprogress::OnDestroy() 
  387. {
  388.   //((CWnd*)this)->m_pCtrlCont->OnUIActivate(NULL);
  389.   WHTT_LOCK();
  390.   termine_requested=1;    // quit!
  391.   WHTT_UNLOCK();
  392.   StopTimer();
  393.   if (BackAffLog)
  394.   if (form.m_hWnd)
  395.     form.EndDialog(IDOK);       // terminer!
  396.   this_CSplitterFrame->CheckRestore();
  397.   //Sleep(150);             // Θvite les problΦmes d'accΦs α m_hWnd juste avant le destroy
  398.   CPropertyPage::OnDestroy();
  399. }
  400.  
  401. BOOL Cinprogress::OnInitDialog() 
  402. {
  403.   m_inphide=TRUE;
  404.   UpdateData(false);      // force to call DoDataExchange
  405.   inprogress=this;
  406.  
  407.   memset(&SInfo, 0, sizeof(SInfo));
  408.  
  409.   BackAffLog=NULL;
  410.   strcpy(pathlog,"");
  411.  
  412.     //CPropertyPage::OnInitDialog();
  413.   EnableToolTips(true);     // TOOL TIPS
  414.  
  415.   // initialisation des champs pour les redraws en boucle
  416.   element[0][0]=&m_st0;
  417.   element[0][1]=&m_st1;
  418.   element[0][2]=&m_st2;
  419.   element[0][3]=&m_st3;
  420.   element[0][4]=&m_st4;
  421.   element[0][5]=&m_st5;
  422.   element[0][6]=&m_st6;
  423.   element[0][7]=&m_st7;
  424.   element[0][8]=&m_st8;
  425.   element[0][9]=&m_st9;
  426.   element[0][10]=&m_st10;
  427.   element[0][11]=&m_st11;
  428.   element[0][12]=&m_st12;
  429.   element[0][13]=&m_st13;
  430.  
  431.   element[1][0]=&m_nm0;
  432.   element[1][1]=&m_nm1;
  433.   element[1][2]=&m_nm2;
  434.   element[1][3]=&m_nm3;
  435.   element[1][4]=&m_nm4;
  436.   element[1][5]=&m_nm5;
  437.   element[1][6]=&m_nm6;
  438.   element[1][7]=&m_nm7;
  439.   element[1][8]=&m_nm8;
  440.   element[1][9]=&m_nm9;
  441.   element[1][10]=&m_nm10;
  442.   element[1][11]=&m_nm11;
  443.   element[1][12]=&m_nm12;
  444.   element[1][13]=&m_nm13;
  445.  
  446.   // rajoutΘ
  447.   element[4][0]=&m_nn0;
  448.   element[4][1]=&m_nn1;
  449.   element[4][2]=&m_nn2;
  450.   element[4][3]=&m_nn3;
  451.   element[4][4]=&m_nn4;
  452.   element[4][5]=&m_nn5;
  453.   element[4][6]=&m_nn6;
  454.   element[4][7]=&m_nn7;
  455.   element[4][8]=&m_nn8;
  456.   element[4][9]=&m_nn9;
  457.   element[4][10]=&m_nn10;
  458.   element[4][11]=&m_nn11;
  459.   element[4][12]=&m_nn12;
  460.   element[4][13]=&m_nn13;
  461.  
  462.   element[2][0]=&m_sl0;
  463.   element[2][1]=&m_sl1;
  464.   element[2][2]=&m_sl2;
  465.   element[2][3]=&m_sl3;
  466.   element[2][4]=&m_sl4;
  467.   element[2][5]=&m_sl5;
  468.   element[2][6]=&m_sl6;
  469.   element[2][7]=&m_sl7;
  470.   element[2][8]=&m_sl8;
  471.   element[2][9]=&m_sl9;
  472.   element[2][10]=&m_sl10;
  473.   element[2][11]=&m_sl11;
  474.   element[2][12]=&m_sl12;
  475.   element[2][13]=&m_sl13;
  476.  
  477.   element[3][0]=&m_sk0;
  478.   element[3][1]=&m_sk1;
  479.   element[3][2]=&m_sk2;
  480.   element[3][3]=&m_sk3;
  481.   element[3][4]=&m_sk4;
  482.   element[3][5]=&m_sk5;
  483.   element[3][6]=&m_sk6;
  484.   element[3][7]=&m_sk7;
  485.   element[3][8]=&m_sk8;
  486.   element[3][9]=&m_sk9;
  487.   element[3][10]=&m_sk10;
  488.   element[3][11]=&m_sk11;
  489.   element[3][12]=&m_sk12;
  490.   element[3][13]=&m_sk13;
  491.  
  492.   // Patcher l'interface pour les Franτais ;-)
  493.   if (LANG_T(-1)) {    // Patcher en franτais
  494.     //SetDlgItemText(,"");
  495.     SetDlgItemText(IDC_STATIC_bytes,LANG(LANG_H8) /*"Octets sauvΘs:"*/);
  496.     SetDlgItemText(IDC_STATIC_scanned,LANG(LANG_H9) /*"Liens parcourus:"*/);
  497.     SetDlgItemText(IDC_STATIC_time,LANG(LANG_H10) /*"Temps:"*/);
  498.     SetDlgItemText(IDC_STATIC_sockets,LANG(LANG_H11) /*"Connexions:"*/);
  499.     SetDlgItemText(IDC_inphide,LANG(LANG_H12) /*"En cours:"*/);
  500.     SetDlgItemText(IDC_STATIC_informations,LANG_H16);   
  501.     SetDlgItemText(IDC_STATIC_written,LANG_H17);   
  502.     SetDlgItemText(IDC_STATIC_updated,LANG_H18);   
  503.     SetDlgItemText(IDC_STATIC_errors,LANG_H19);    
  504.     SetDlgItemText(IDC_STATIC_inprog,LANG_H20);    
  505.     //SetDlgItemText(IDC_hide,LANG(LANG_H13) /*"Cacher"*/);
  506.     SetDlgItemText(IDC_STATIC_trate,LANG(LANG_H14) /*"Taux transfert"*/);
  507.     for(int i=0;i<NStatsBuffer;i++)
  508.       element[3][i]->SetWindowText(LANG(LANG_H15));
  509.  
  510.     // patch menu
  511.     /*
  512.     CMenu* menu = GetMenu();
  513.     if (menu) {
  514.       menu->ModifyMenu(0,MF_BYPOSITION,0,LANG(LANG_O1));
  515.       menu->ModifyMenu(1,MF_BYPOSITION,1,LANG(LANG_O2));
  516.       menu->ModifyMenu(2,MF_BYPOSITION,2,LANG(LANG_O3));
  517.       menu->ModifyMenu(3,MF_BYPOSITION,3,LANG(LANG_O4));
  518.       menu->ModifyMenu(4,MF_BYPOSITION,4,LANG(LANG_O5));
  519.       //
  520.       menu->ModifyMenu(ID_FILE_PAUSE,MF_BYCOMMAND,ID_FILE_PAUSE,LANG(LANG_O10));
  521.       menu->ModifyMenu(ID_FILE_EXIT,MF_BYCOMMAND,ID_FILE_EXIT,LANG(LANG_O11));
  522.       menu->ModifyMenu(ID_OPTIONS_MODIFY,MF_BYCOMMAND,ID_OPTIONS_MODIFY,LANG(LANG_O12));
  523.       menu->ModifyMenu(ID_LOG_VIEWLOG,MF_BYCOMMAND,ID_LOG_VIEWLOG,LANG(LANG_O13));
  524.       menu->ModifyMenu(ID_LOG_VIEWERRORLOG,MF_BYCOMMAND,ID_LOG_VIEWERRORLOG,LANG(LANG_O14));
  525.       menu->ModifyMenu(ID_LOG_VIEWTRANSFERS,MF_BYCOMMAND,ID_LOG_VIEWTRANSFERS,LANG(LANG_O14b));
  526.       menu->ModifyMenu(ID_WINDOW_HIDE,MF_BYCOMMAND,ID_WINDOW_HIDE,LANG(LANG_O15));
  527.       menu->ModifyMenu(ID_ABOUT,MF_BYCOMMAND,ID_ABOUT,LANG(LANG_O16));
  528.       DrawMenuBar();
  529.     }
  530.     */
  531.   }
  532.  
  533.   /*
  534.   {
  535.     LOGFONT lf;
  536.     if (element[0][0]->GetFont()->GetLogFont(&lf)) {
  537.       CFont* fnt = new CFont();
  538.       if (fnt->CreateFont(lf.lfHeight,0,0,0,FW_DONTCARE,0,0,0,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH,"Fixedsys")) {
  539.         int i;
  540.         for (i=0;i<NStatsBuffer; i++) {
  541.           element[0][i]->SetFont(fnt,true);
  542.           element[1][i]->SetFont(fnt,true);
  543.         }
  544.       }
  545.     }
  546.   }
  547.   */
  548.  
  549.   SetIcon(httrack_icon,false);
  550.   SetIcon(httrack_icon,true);  
  551.  
  552.   if (choixdeb[0]=='!')
  553.     Oniplog(0);           // ouvrir log
  554.  
  555.   // Lancer timer!
  556.   StartTimer();
  557.  
  558.     return TRUE;  // return TRUE unless you set the focus to a control
  559.                   // EXCEPTION: OCX Property Pages should return FALSE
  560. }
  561.  
  562. void Cinprogress::StartTimer() {
  563.   if (!timer) {
  564.     timer=SetTimer(WM_TIMER,HTS_SLEEP_WIN,NULL);
  565.   }
  566. }
  567. void Cinprogress::StopTimer() {
  568.   if (timer) {
  569.     KillTimer(timer);
  570.     timer=0;
  571.   }
  572. }
  573.  
  574. UINT AffLog( LPVOID pP ) {
  575.   Cinprogress* inp = (Cinprogress*) pP;
  576.   if (inp != NULL) {
  577.     inp->form.m_iplog=(CString) "No log report";
  578.     inp->form.DoModal();
  579.     inp->BackAffLog = NULL;
  580.   }
  581.   return 0;    // thread completed successfully
  582. }
  583.  
  584. // log pour fichiers d'erreur et de log
  585. void Cinprogress::OniplogLog() {
  586.   Oniplog(0);
  587. }
  588. void Cinprogress::OniplogErr() {
  589.   Oniplog(1);
  590. }
  591.  
  592. void Cinprogress::Oniplog(int mode)  {
  593.   if (!BackAffLog) {  // pas encore lancΘ
  594.     strcpy(pathlog,dialog0->GetPath());
  595.     if (strlen(pathlog)>0)
  596.     if ((pathlog[strlen(pathlog)-1]!='/') && (pathlog[strlen(pathlog)-1]!='\\'))
  597.       strcat(pathlog,"/");
  598.     // fichier log existe ou on est tΘlΘcommandΘ par un !
  599.     if ( (fexist(fconcat(pathlog,"hts-err.txt"))) || (fexist(fconcat(pathlog,"hts-log.txt"))) || (choixdeb[0]=='!') ) {
  600.       if (mode)
  601.         form.type_log=0;
  602.       else
  603.         form.type_log=1;
  604.       strcpy(form.pathlog,pathlog);
  605.       BackAffLog = AfxBeginThread(AffLog,this);
  606.     } else {
  607.       char s[1024];
  608.       sprintf(s,LANG(LANG_H2 /*"No log files in %s!","Aucun fichier d'audit dans %s!"*/),pathlog);
  609.       AfxMessageBox(s,MB_OK+MB_ICONEXCLAMATION);
  610.     }
  611.   }
  612. }
  613.  
  614. void Cinprogress::OnViewTransfers() 
  615. {
  616.   StatsBuffer_info(0);
  617. }
  618.  
  619. void Cinprogress::OnPause() 
  620. {
  621.   int m;
  622.   if (!hts_setpause(-1))
  623.     m=AfxMessageBox(LANG(LANG_H3 /*"Pause Transfer?","Placer le transfert sur pause?"*/),MB_OKCANCEL+MB_ICONQUESTION);
  624.   else
  625.     m=IDOK;
  626.   if (m==IDOK) {
  627.     hts_setpause(!hts_setpause(-1));
  628.     CMenu* m;
  629.     if (m = AfxGetApp()->GetMainWnd()->GetMenu()) {
  630.       if (hts_setpause(-1))
  631.         m->CheckMenuItem(ID_FILE_PAUSE,MF_CHECKED);
  632.       else
  633.         m->CheckMenuItem(ID_FILE_PAUSE,MF_UNCHECKED);
  634.     }
  635.   }
  636. }
  637.  
  638. // modif options
  639. void Cinprogress::OnModifyOpt() 
  640. {
  641.   static httrackp opt;
  642.   //
  643.   maintab->m_option1.modify=
  644.     maintab->m_option2.modify=
  645.     maintab->m_option3.modify=
  646.     maintab->m_option7.modify=
  647.     maintab->m_option8.modify=
  648.     maintab->m_option9.modify=
  649.     maintab->m_option11.modify=
  650.     maintab->m_option10.modify=1;    // mode modification
  651.   if (maintab->DoModal() == IDOK) {
  652.     int n;
  653.     LLint ln;
  654.  
  655.     // dΘvalider champs (non modifiΘs)
  656.     opt.maxsite = -1;
  657.     opt.maxfile_nonhtml = -1;
  658.     opt.maxfile_html = -1;
  659.     opt.maxsoc = -1;
  660.     opt.nearlink = -1;
  661.     opt.timeout = -1;
  662.     opt.rateout = -1;
  663.     opt.maxtime = -1;
  664.     opt.maxrate = -1;
  665.     strcpy(opt.user_agent , "");
  666.     opt.retry = -1;
  667.     opt.hostcontrol = -1;
  668.     opt.errpage = -1;
  669.     opt.travel = -1;
  670.     opt.external = -1;
  671.     opt.delete_old=-1;
  672.     opt.parseall=-1;
  673.     opt.delete_old=-1;
  674.  
  675.     opt.travel=0;         // NOTE: NE SERA PRIS EN COMPTE QUE LE BIT 8
  676.     if(maintab->m_option1.m_testall)
  677.       opt.travel|=256;     
  678.  
  679.     if(maintab->m_option1.m_parseall)
  680.       opt.parseall=1;     
  681.     else
  682.       opt.parseall=0;     
  683.  
  684.     // near link,err page
  685.     if (maintab->m_option1.m_link)
  686.       opt.nearlink=1;
  687.     else
  688.       opt.nearlink=0;
  689.  
  690.     if (maintab->m_option2.m_errpage)
  691.       opt.errpage=1;
  692.     else
  693.       opt.errpage=0;
  694.  
  695.     if (maintab->m_option2.m_external)
  696.       opt.external=1;
  697.     else
  698.       opt.external=0;
  699.  
  700.     if (maintab->m_option2.m_nopurge)
  701.       opt.delete_old=1;
  702.     else
  703.       opt.delete_old=0;
  704.  
  705.  
  706.     // host control
  707.     {
  708.       int a=0;
  709.       if (maintab->m_option4.m_remt)
  710.         a+=1;
  711.       if (maintab->m_option4.m_rems)
  712.         a+=2;
  713.       opt.hostcontrol=a;
  714.     }
  715.  
  716.     // sockets
  717.     if (strcmp(maintab->m_option4.m_connexion,"")!=0) {
  718.       if (sscanf(maintab->m_option4.m_connexion,"%d",&n) == 1)
  719.         opt.maxsoc = n;
  720.     } 
  721.  
  722.     // maxfile_nonhtml
  723.     if (strcmp(maintab->m_option5.m_othermax,"")!=0) {
  724.       if (sscanf(maintab->m_option5.m_othermax,LLintP,&ln) == 1)
  725.         opt.maxfile_nonhtml = ln;
  726.     } else
  727.       opt.maxfile_nonhtml = -1;
  728.  
  729.     // maxfile_html
  730.     if (strcmp(maintab->m_option5.m_maxhtml,"")!=0) {
  731.       if (sscanf(maintab->m_option5.m_maxhtml,LLintP,&ln) == 1)
  732.         opt.maxfile_html = ln;
  733.     } else
  734.       opt.maxfile_html = -1;
  735.  
  736.     // maxsite
  737.     if (strcmp(maintab->m_option5.m_sizemax,"")!=0) {
  738.       if (sscanf(maintab->m_option5.m_sizemax,LLintP,&ln) == 1)
  739.         opt.maxsite = ln;
  740.     } else
  741.       opt.maxsite = -1;
  742.  
  743.     // fragment
  744.     if (strcmp(maintab->m_option5.m_pausebytes,"")!=0) {
  745.       if (sscanf(maintab->m_option5.m_pausebytes,LLintP,&ln) == 1)
  746.         opt.fragment = ln;
  747.     } else
  748.       opt.fragment = -1;
  749.  
  750.     // timeout
  751.     if (strcmp(maintab->m_option4.m_timeout,"")!=0) {
  752.       if (sscanf(maintab->m_option4.m_timeout,"%d",&n) == 1)
  753.         opt.timeout = n;
  754.     } else
  755.       opt.timeout = -1;
  756.  
  757.     // rateout
  758.     if (strcmp(maintab->m_option4.m_rate,"")!=0) {
  759.       if (sscanf(maintab->m_option4.m_rate,"%d",&n) == 1)
  760.         opt.rateout = n;
  761.     } else
  762.       opt.rateout = -1;
  763.  
  764.     // maxtime
  765.     if (strcmp(maintab->m_option5.m_maxtime,"")!=0) {
  766.       if (sscanf(maintab->m_option5.m_maxtime,"%d",&n) == 1)
  767.         opt.maxtime = n;
  768.     } else
  769.       opt.maxtime = -1;
  770.  
  771.     // maxrate
  772.     if (strcmp(maintab->m_option5.m_maxrate,"")!=0) {
  773.       if (sscanf(maintab->m_option5.m_maxrate,"%d",&n) == 1)
  774.         opt.maxrate = n;
  775.     } else
  776.       opt.maxrate = -1;
  777.  
  778.     // max. connect
  779.     if (strcmp(maintab->m_option5.m_maxconn,"")!=0) {
  780.       if (sscanf(maintab->m_option5.m_maxconn,"%d",&n) == 1)
  781.         opt.maxconn = n;
  782.     } else
  783.       opt.maxconn = -1;
  784.  
  785.     // retry
  786.     if (strcmp(maintab->m_option4.m_retry,"")!=0) {
  787.       if (sscanf(maintab->m_option4.m_retry,"%d",&n) == 1)
  788.         opt.retry = n;
  789.     } else
  790.       opt.retry = -1;
  791.  
  792.     // user_agent
  793.     if (strcmp(maintab->m_option6.m_user,"")!=0) {
  794.       strcpy(opt.user_agent,maintab->m_option6.m_user);
  795.     }
  796.  
  797.     hts_setopt(&opt);
  798.   }
  799.   maintab->m_option1.modify=
  800.     maintab->m_option2.modify=
  801.     maintab->m_option3.modify=
  802.     maintab->m_option7.modify=
  803.     maintab->m_option8.modify=
  804.     maintab->m_option9.modify=
  805.     maintab->m_option11.modify=
  806.     maintab->m_option10.modify=0;
  807. }
  808.  
  809.  
  810.  
  811. // canceller un lien manuellement
  812. void Cinprogress::StatsBuffer_cancel(int id) {
  813.   hts_cancel_file(StatsBuffer[id].url_sav);
  814. }
  815. void Cinprogress::StatsBuffer_info(int id) {
  816.   if (SInfo.stat_time>0) {
  817.     if (StatsBuffer[id].etat[0]) {
  818.       CInfoUrl box;
  819.       box.id=StatsBuffer[id].back;
  820.       _Cinprogress_inst=&box;
  821.       box.DoModal();
  822.       _Cinprogress_inst=NULL;
  823.     }
  824.   }
  825. }
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833. // ------------------------------------------------------------
  834. // TOOL TIPS
  835. //
  836. // ajouter dans le .cpp:
  837. // remplacer les deux Wid1:: par le nom de la classe::
  838. // dans la message map, ajouter
  839. // ON_NOTIFY_EX( TTN_NEEDTEXT, 0, OnToolTipNotify )
  840. // dans initdialog ajouter
  841. // EnableToolTips(true);     // TOOL TIPS
  842. //
  843. // ajouter dans le .h:
  844. // char* GetTip(int id);
  845. // et en generated message map
  846. // afx_msg BOOL OnToolTipNotify( UINT id, NMHDR * pNMHDR, LRESULT * pResult );
  847. BOOL Cinprogress::OnToolTipNotify( UINT id, NMHDR * pNMHDR, LRESULT * pResult )
  848. {
  849.   TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR;
  850.   UINT nID =pNMHDR->idFrom;
  851.   if (pTTT->uFlags & TTF_IDISHWND)
  852.   {
  853.     // idFrom is actually the HWND of the tool
  854.     nID = ::GetDlgCtrlID((HWND)nID);
  855.     if(nID)
  856.     {
  857.       char* st=GetTip(nID);
  858.       if (st != "") {
  859.         pTTT->lpszText = st;
  860.         pTTT->hinst = AfxGetResourceHandle();
  861.         return(TRUE);
  862.       }
  863.     }
  864.   }
  865.   return(FALSE);
  866. }
  867. char* Cinprogress::GetTip(int ID)
  868. {
  869.   switch(ID) {
  870.     //case IDC_STOPALL: return LANG(LANG_H4); break; // "Stop the mirror","Stopper le miroir"); break;
  871.     //case IDC_hide:    return LANG(LANG_H5); break; // "Hide this window behind the system tray","Cacher la fenΩtre dans la barre systΦme"); break;
  872.     case IDC_sk0:     return LANG(LANG_H6); break; // "Click to skip a link or interrupt parsing","Clic pour sauter un lien ou interrompre"); break;
  873.     case IDC_sk1: case IDC_sk2: case IDC_sk3: case IDC_sk4:
  874.     case IDC_sk5: case IDC_sk6: case IDC_sk7: case IDC_sk8: case IDC_sk9:
  875.                       return LANG(LANG_H7); break; // "Click to skip a link","Clic pour sauter un lien"); break;
  876.                       //
  877.   }
  878.   return "";
  879. }
  880. // TOOL TIPS
  881. // ------------------------------------------------------------
  882.  
  883.  
  884.  
  885. // Appel aide
  886. BOOL Cinprogress::OnHelpInfo2() {
  887.   return OnHelpInfo(NULL);
  888. }
  889.  
  890. BOOL Cinprogress::OnHelpInfo(HELPINFO* dummy) 
  891. {
  892.   //return CPropertyPage::OnHelpInfo(pHelpInfo);
  893.   HtsHelper->Help();
  894.   return true;
  895.   //AfxGetApp()->WinHelp(0,HELP_FINDER);    // Index du fichier Hlp
  896.   //return true;
  897. }
  898.  
  899.  
  900. int Cinprogress::OnCreate(LPCREATESTRUCT lpCreateStruct) 
  901. {
  902.     if (CPropertyPage::OnCreate(lpCreateStruct) == -1)
  903.         return -1;
  904.  
  905.   // Drag&Drop
  906.   drag=new CEasyDropTarget(this);
  907.   if (drag->IsRegistered()) {
  908.     drag->SetTextCallback(wm_CEasyDropTargetCallback);
  909.   }
  910.     
  911.     return 0;
  912. }
  913.  
  914.  
  915. // Message from CEasyDropTarget
  916. LRESULT Cinprogress::DragDropText(WPARAM wParam,LPARAM lParam) {
  917.   if (lParam) {
  918.     CString st=*((CString*) lParam);
  919.     CLIPFORMAT cfFormat=wParam;
  920.     st=Wid1::TextToUrl(st,cfFormat);
  921.     if (st=="")
  922.       AfxMessageBox(LANG(LANG_DIAL11),MB_SYSTEMMODAL);
  923.     else {
  924.       CString aff=LANG(LANG_DIAL12);
  925.       if (AfxMessageBox(aff+st,MB_SYSTEMMODAL|MB_YESNO|MB_ICONQUESTION)==IDYES) {
  926.         int pause=0;
  927.         char** tab=CEasyDropTarget::StringToArray(st);
  928.         hts_addurl(tab);
  929.         if (pause=hts_setpause(-1))
  930.           hts_setpause(0);      // enlever pause
  931.         {
  932.           int i=0;
  933.           while((hts_addurl(NULL)) && (i<100)) {
  934.             Sleep(100);
  935.             i++;
  936.           }
  937.           if (!(i<100)) {
  938.             hts_resetaddurl();
  939.             AfxMessageBox(LANG(LANG_DIAL13));
  940.           }
  941.           hts_setpause(pause);      // remettre pause Θventuelle
  942.         }
  943.         CEasyDropTarget::ReleaseStringToArray(tab);
  944.         tab=NULL;
  945.       }
  946.     }
  947.   }
  948.   return 0;
  949. }
  950.  
  951. // Refresh
  952. void Cinprogress::OnTimer(UINT nIDEvent) 
  953. {
  954.   WHTT_LOCK();
  955.   if (!termine) {
  956.     if (SInfo.refresh) {
  957.       hts_is_parsing(0);        // refresh demandΘ si en mode parsing
  958.       // while(INFILLMEM_LOCKED) Sleep(10);    // attendre au cas o∙
  959.       if (!termine)
  960.         inprogress_refresh();        // on refresh!
  961.     }
  962.     SInfo.ask_refresh=1;
  963.   }
  964.   WHTT_UNLOCK();
  965.   CPropertyPage::OnTimer(nIDEvent);
  966. }
  967.  
  968. BOOL Cinprogress::DestroyWindow() 
  969. {
  970.   StopTimer();
  971.   inprogress=NULL;
  972.   delete drag;
  973.     return CPropertyPage::DestroyWindow();
  974. }
  975.  
  976. // Fin
  977.  
  978. void Cinprogress::OnEndMirror() {
  979.   //this_CSplitterFrame->SetNewView(0,1,RUNTIME_CLASS(Cinfoend));
  980.  
  981.   // Copie de trans.cpp
  982.   this_CWizTab->ModifyStyle(WS_VISIBLE,0,0);
  983.   this_CWizTab->RedrawWindow();
  984.   //
  985.   //{
  986.   //  CWizTab* tmp;
  987.   //  tmp=this_CWizTab;
  988.   this_CWizTab=this_intCWizTab;
  989.   //  this_CWizTab2=tmp;
  990.   //}
  991.   //
  992.   this_CWizTab->ModifyStyle(0,WS_VISIBLE,0);
  993.   this_CWizTab->ModifyStyle(WS_DISABLED,0,0);
  994.   this_CSplitterFrame->RedrawWindow();
  995.   // Fin de Copie de trans.cpp
  996.  
  997.   this_CWizTab->EndInProgress();
  998.   if (IsWindow(this_Cinfoend->m_hWnd))
  999.     this_Cinfoend->SetDlgItemText(IDC_infoend,end_mirror_msg);
  1000.  
  1001.   if (exit_xh == 1) {     /* Interrupted mirror! */
  1002.     char pathlog[HTS_URLMAXSIZE*2];
  1003.     strcpy(pathlog,dialog0->GetPath());
  1004.     if (strlen(pathlog)>0) {
  1005.       if ((pathlog[strlen(pathlog)-1]!='/') && (pathlog[strlen(pathlog)-1]!='\\'))
  1006.         strcat(pathlog,"/");
  1007.     }
  1008.     // Aborted updated.. restore old cache?!
  1009.     if ( (fexist(fconcat(pathlog,"hts-cache/old.dat"))) && (fexist(fconcat(pathlog,"hts-cache/old.ndx"))) ) {
  1010.       if (AfxMessageBox(LANG_F22b,MB_YESNO|MB_DEFBUTTON2) == IDYES) {
  1011.         if (remove(fconcat(pathlog,"hts-cache/new.dat"))) {
  1012.           AfxMessageBox(LANG_F24 );
  1013.         }
  1014.         if (remove(fconcat(pathlog,"hts-cache/new.ndx"))) {
  1015.           AfxMessageBox(LANG_F24 );
  1016.         }
  1017.         if (remove(fconcat(pathlog,"hts-cache/new.lst"))) {
  1018.           AfxMessageBox(LANG_F24 );
  1019.         }
  1020.         remove(fconcat(pathlog,"hts-cache/new.txt"));
  1021.         rename(fconcat(pathlog,"hts-cache/old.dat"),fconcat(pathlog,"hts-cache/new.dat"));
  1022.         rename(fconcat(pathlog,"hts-cache/old.ndx"),fconcat(pathlog,"hts-cache/new.ndx"));
  1023.         rename(fconcat(pathlog,"hts-cache/old.lst"),fconcat(pathlog,"hts-cache/new.lst"));
  1024.         rename(fconcat(pathlog,"hts-cache/old.txt"),fconcat(pathlog,"hts-cache/new.txt"));
  1025.       }
  1026.     }
  1027.   } else if (exit_xh == 2) {     /* No connection! */
  1028.     AfxMessageBox(LANG_F22c );
  1029.   }
  1030. }
  1031.  
  1032. BOOL Cinprogress::OnQueryCancel( ) {
  1033.   OnStopall();
  1034.   //this_CSplitterFrame->SetNewView(0,1,RUNTIME_CLASS(CDialogContainer));
  1035.   return FALSE;
  1036. }
  1037.  
  1038.  
  1039. void Cinprogress::Oninphide() 
  1040. {
  1041.   int status=IsDlgButtonChecked(IDC_inphide);
  1042.   if (status) {
  1043.     GetDlgItem(IDC_STATIC_actions)->ModifyStyle(WS_DISABLED,0);  // disabled
  1044.     GetDlgItem(IDC_STATIC_actions)->ModifyStyle(0,WS_VISIBLE);   // not visible
  1045.   } else {
  1046.     GetDlgItem(IDC_STATIC_actions)->ModifyStyle(0,WS_DISABLED);  // not disabled
  1047.     GetDlgItem(IDC_STATIC_actions)->ModifyStyle(WS_VISIBLE,0);   // visible
  1048.   }
  1049.   int i;
  1050.   for(i=0;i<NStatsBuffer;i++) {
  1051.     int j;
  1052.     for(j=0;j<5;j++) {
  1053.       if (status) {
  1054.         inprogress->element[j][i]->ModifyStyle(WS_DISABLED,0);  // disabled
  1055.         inprogress->element[j][i]->ModifyStyle(0,WS_VISIBLE);   // not visible
  1056.       } else {
  1057.         inprogress->element[j][i]->ModifyStyle(0,WS_DISABLED);  // not disabled
  1058.         inprogress->element[j][i]->ModifyStyle(WS_VISIBLE,0);   // visible
  1059.       }
  1060.     }
  1061.   }
  1062.   RedrawWindow();
  1063. }
  1064.  
  1065. BOOL Cinprogress::OnSetActive() 
  1066. {
  1067.   WHTT_LOCATION("inprogress");
  1068.     return CPropertyPage::OnSetActive();
  1069. }
  1070.